package com.tanjun.thirdservice.api.wx;

import com.tanjun.common.constants.ServiceConstant;
import com.tanjun.common.constants.UrlConstant;
import com.tanjun.common.model.R;
import com.tanjun.thirdservice.request.WxCode2UserVo;
import com.tanjun.thirdservice.response.WxCode2UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.time.LocalDateTime;

@FeignClient(name = ServiceConstant.THIRD_SERVICE)
public interface WxUserApi {

    String PREX = "/wxUser";

    @PostMapping(UrlConstant.URL_AUTH.OPEN + PREX + "/jscode2session")
    R<WxCode2UserDto> jscode2session(WxCode2UserVo paramVo);

    @GetMapping(UrlConstant.URL_AUTH.OPEN + PREX + "/now")
    R<LocalDateTime> now();
}
